import type { RouteRecordRaw } from 'vue-router';

const productRoute: RouteRecordRaw = {
  path: '/product',
  name: 'Product',
  component: () => import('#/layouts/basic.vue'),
  meta: {
    order: 10,
    title: '产品管理',
    icon: 'ion:pricetags-outline',
  },
  children: [
    {
      path: 'base-info/list',
      name: 'ProductBaseInfoList',
      component: () => import('#/views/product/product/list.vue'),
      meta: {
        title: '产品基础信息',
        icon: 'ion:document-text-outline',
        sort: 1,
        permission: ['product:product:list'],
      },
    },
    {
      path: 'list',
      name: 'ProductList',
      component: () => import('#/views/product/product/list.vue'),
      meta: {
        title: '产品信息',
        icon: 'iconfont icon-chanpin',
        sort: 1,
        permission: ['product:product:list'],
      },
    },
    {
      path: 'import',
      name: 'ProductImport',
      component: () => import('#/views/product/product/Import.vue'),
      meta: {
        title: '产品数据导入',
        icon: 'iconfont icon-import',
        sort: 2,
        permission: ['product:product:import'],
      },
    },
  ],
};

export default [productRoute];
